home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
12511500
/
var1308.dms
/
var1308.adf
/
DNET2_10.LHA
/
DNet
/
Amiga
/
Sourcen.lha
/
lib
/
waitqueue.c
< prev
Wrap
C/C++ Source or Header
|
1993-01-14
|
669b
|
36 lines
/*
* WaitQueue.C
*/
#include "lib.h"
short
WaitQueue(_chan, skipior)
void *_chan;
IOSTD *skipior;
{
CHANN *chan = (CHANN *)_chan;
IOSTD *io;
short error = 0;
while (chan->queued > chan->qlen) { /* until done */
WaitPort(&chan->port); /* something */
io = (IOSTD *)GetMsg(&chan->port);
if (io->io_Message.mn_Node.ln_Type == NT_REPLYMSG) {
if (error == 0)
error = io->io_Error;
if (io != skipior) {
if (io->io_Length)
FreeMem(io->io_Data, io->io_Length);
FreeMem(io, sizeof(IOSTD));
}
--chan->queued;
} else {
AddTail(&chan->rdylist, (NODE *)io);
}
}
return(error);
}